cmake_minimum_required(VERSION 3.10)
project(MyLoggerProject)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include_directories(include)

# 明确列出所有源文件（避免 GLOB 可能漏文件）
set(SOURCES
    src/Logger.cpp
    src/LogQueue.cpp
    src/main.cpp
)

# 生成可执行文件
add_executable(logger ${SOURCES})

# 链接 pthread（必须在 add_executable 之后）
target_link_libraries(logger PRIVATE pthread)